#ifndef COMPILER_ONLINE
#include "header.cpp"
#endif

void Test1() {
    Solution sol;
    vector<int> nums = {2,7,11,15};
    int target = 9;
    vector<int> res = sol.twoSum(nums, target);
    if (res.size() == 2 && (res[0] == 0 && res[1] == 1)) {
        cout << "通过用例1，测试[2,7,11,15]与target=9通过 ... OK!" << endl;
    } else {
        cout << "未通过用例1，测试值为nums=[2,7,11,15]、target=9，实际输出下标为[" << res[0] << "," << res[1] << "]" << endl;
    }
}

void Test2() {
    Solution sol;
    vector<int> nums = {3,2,4};
    int target = 6;
    vector<int> res = sol.twoSum(nums, target);
    if (res.size() == 2 && (res[0] == 1 && res[1] == 2)) {
        cout << "通过用例2，测试[3,2,4]与target=6通过 ... OK!" << endl;
    } else {
        cout << "未通过用例2，测试值为nums=[3,2,4]、target=6，实际输出下标为[" << res[0] << "," << res[1] << "]" << endl;
    }
}

void Test3() {
    Solution sol;
    vector<int> nums = {3,3};
    int target = 6;
    vector<int> res = sol.twoSum(nums, target);
    if (res.size() == 2 && (res[0] == 0 && res[1] == 1)) {
        cout << "通过用例3，测试[3,3]与target=6通过 ... OK!" << endl;
    } else {
        cout << "未通过用例3，测试值为nums=[3,3]、target=6，实际输出下标为[" << res[0] << "," << res[1] << "]" << endl;
    }
}

void Test4() {
    Solution sol;
    vector<int> nums = {1,5,9};
    int target = 10;
    vector<int> res = sol.twoSum(nums, target);
    if (res.size() == 2 && (res[0] == 0 && res[1] == 2)) {
        cout << "通过用例4，测试[1,5,9]与target=10通过 ... OK!" << endl;
    } else {
        cout << "未通过用例4，测试值为nums=[1,5,9]、target=10，实际输出下标为[" << res[0] << "," << res[1] << "]" << endl;
    }
}

void Test5() {
    Solution sol;
    vector<int> nums = {2,3,5,7};
    int target = 12;
    vector<int> res = sol.twoSum(nums, target);
    if (res.size() == 2 && (res[0] == 2 && res[1] == 3)) {
        cout << "通过用例5，测试[2,3,5,7]与target=12通过 ... OK!" << endl;
    } else {
        cout << "未通过用例5，测试值为nums=[2,3,5,7]、target=12，实际输出下标为[" << res[0] << "," << res[1] << "]" << endl;
    }
}

int main() {
    Test1();
    Test2();
    Test3();
    Test4();
    Test5();
    return 0;
}